<link href="//cdn.bootcss.com/weui/1.0.2/style/weui.css" rel="stylesheet">
<style>
    /*弹框*/
    .add_name {
        border: 1px solid #999999;
        height: 30px;
        font-size: 14px;
        /* border: 0; */
    }
    html, body {
        background-color: #ffffff;
        height: 100%;
        font-family: "Microsoft YaHei",微软雅黑,"Helvetica Neue", Helvetica, Arial, sans-serif;
    }
</style>
<!--弹框-->
<div id="dialogs">
    <!--BEGIN dialog1-->
    <div class="js_dialog" id="iosDialog1" style="display: none;">
        <div class="weui-mask"></div>
        <div class="weui-dialog">
            <div class="weui-dialog__hd"><strong class="weui-dialog__title">添加店铺</strong></div>
            <div class="weui-dialog__bd">
                店组名：<input type="text" placeholder="请输入店组名" class="add_name">
            </div>
            <div class="weui-dialog__ft">
                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_default">取消</a>
                <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary">确定</a>
            </div>
        </div>
    </div>
    <!--END dialog1-->
</div>
<script src="<%= global.config.cdn %>/jquery/2.2.4/jquery.<%= global.config.mode %>js"></script>
<script>
    //tk
    var $iosDialog1=$('#iosDialog1');//弹框
    $('.dz_add').click(function(){
        $iosDialog1.fadeIn(200);
    })
    $('.weui-dialog__btn_default').click(function () {
        $(this).parents('.js_dialog').fadeOut(200);
    })
    $('.weui-dialog__btn_primary').click(function(){
        var add_name=$('.add_name').val();
        if(add_name!=''){
            $(this).parents('.js_dialog').fadeOut(200);
            var a="<div class='weui_media_box weui_media_small_appmsg' onclick='han(this)'><div class='weui_cells weui_cells_access'><a class='weui_cell' href='javascript:;'><div class='weui_cell_hd'><img src='/photo/a3.png'></div><div class='weui_cell_bd weui_cell_primary'><p class='add_newname'>"+add_name+"</p></div><span class='weui_cell_ft'>000023</span></a></div></div>";
            $('.dianzuk').append(a);
        }
        $('.add_name').val('');
    });
//   function han(){
    //        var dz_name=$('.add_newname').html();
    //        console.log(dz_name);
    //        window.location.href=encodeURI('/view/dianZ_store?dz_name='+dz_name);
    //    };
</script>